home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / minix / up1510b.tgz / up1510b / src / mm / mproc.h < prev    next >
Text File  |  1990-07-23  |  2KB  |  39 lines

  1. /* This table has one slot per process.  It contains all the memory management
  2.  * information for each process.  Among other things, it defines the text, data
  3.  * and stack segments, uids and gids, and various flags.  The kernel and file
  4.  * systems have tables that are also indexed by process, with the contents
  5.  * of corresponding slots referring to the same process in all three.
  6.  */
  7.  
  8. EXTERN struct mproc {
  9.   struct mem_map mp_seg[NR_SEGS];    /* points to text, data, stack */
  10.   char mp_exitstatus;        /* storage for status when process exits */
  11.   char mp_sigstatus;        /* storage for signal # for killed processes */
  12.   pid_t mp_pid;            /* process id */
  13.   int mp_parent;        /* index of parent process */
  14.   int mp_procgrp;        /* process group (used for signals) */
  15.  
  16.   /* Real and effective uids and gids. */
  17.   uid_t mp_realuid;        /* process' real uid */
  18.   uid_t mp_effuid;        /* process' effective uid */
  19.   gid_t mp_realgid;        /* process' real gid */
  20.   gid_t mp_effgid;        /* process' effective gid */
  21.  
  22.   /* Bit maps for signals. */
  23.   unshort mp_ignore;        /* 1 means ignore the signal, 0 means don't */
  24.   unshort mp_catch;        /* 1 means catch the signal, 0 means don't */
  25.   void (*mp_func)();        /* all signals vectored to a single user fcn */
  26.  
  27.   unsigned mp_flags;        /* flag bits */
  28. } mproc[NR_PROCS];
  29.  
  30. /* Flag values */
  31. #define IN_USE           001    /* set when 'mproc' slot in use */
  32. #define WAITING          002    /* set by WAIT system call */
  33. #define HANGING          004    /* set by EXIT system call */
  34. #define PAUSED           010    /* set by PAUSE system call */
  35. #define ALARM_ON         020    /* set when SIGALRM timer started */
  36. #define SEPARATE     040    /* set if file is separate I & D space */
  37. #define    TRACED        0100    /* set if process is to be traced */
  38. #define STOPPED        0200    /* set if process stopped for tracing */
  39.